/*
 * ElementoRss.h
 *
 *  Created on: 02/05/2014
 *      Author: ariel
 */

#ifndef ELEMENTORSS_H_
#define ELEMENTORSS_H_
#include <iostream>
#include <string>
using namespace std;

#include "Const.h"
#include "../entities/Rss.h"

class ElementoRss {
private:
	int id;
	Rss* registro;
	char status;

public:
	ElementoRss();
	ElementoRss(Rss* registro, int index);
	ElementoRss(Rss*, int, char);
	ElementoRss(const ElementoRss&);
	virtual ~ElementoRss();

	int getId() const;
	void setId(int id);
	Rss* getRegistro();
	void setRegistro(Rss* registro);
	char getStatus() const;
	void setStatus(char status);

	bool isBusy();
	bool isFreed();
	bool isDeleted();

	virtual string serialize();
	virtual void unserialize(std::string &buffer);
	virtual int getDataSize();

	friend ostream& operator << (ostream &o,const ElementoRss &b);
};

#endif /* ELEMENTORSS_H_ */
